package notes

import "github.com/gin-gonic/gin"

func NoteViewInit(e *gin.Engine) {
	view := NewNoteView()
	noteURLInit(e, view)
}

func noteURLInit(e *gin.Engine, view *NoteView) {
	e.GET("/api/notes/list", view.getNoteInfoView)

	e.GET("/api/notes/search", view.searchNoteView)
	e.POST("/api/notes/create", view.createNoteView)
	e.POST("/api/notes/edit", view.updateNoteView)
	e.POST("/api/notes/delete", view.deleteNoteView)

	e.GET("/api/notes/detail", view.getNoteInfoView)
	e.POST("/api/notes/category/create", view.getNoteInfoView)
	e.POST("/api/notes/category/edit", view.getNoteInfoView)
	e.GET("/api/notes/category/view", view.getNoteInfoView)
	e.GET("/api/notes/category/list", view.getNoteInfoView)

}
